/*
 * User.java 
 * Copyright(c) 2015 Treebear
 * ALL Rights Reserved.
 */
package org.ft.domain.entities;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ft.mybatis.domain.AbstractAuditLongEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ft.domain.enums.UserStatus;
import org.ft.domain.enums.UserType;

/**
 * @copyright (C), 2015-2019, XXX有限公司
 * @fileName: User
 * @author: 李阳
 * @date: 2019-06-26 10:33:07
 * @description:
 * @history: <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("sys_user")
public class UserEntity extends AbstractAuditLongEntity{

    private static final long serialVersionUID = 1L;
    /**
     * 所属租户
     */
    @TableField(value = "tenant_id")
    private Long tenantId;

    /**
     * 所属公司Id
     */
    @TableField(value = "company_id")
    private Long companyId;

    /**
     * 所属部门Id
     */
    @TableField(value = "dept_id")
    private Long deptId;
    /**
     * 用户名
     */
    @TableField(value = "user_name")
    private String userName;
    /**
     * 真实姓名
     */
    @TableField(value = "real_name")
    private String realName;
    /**
     * 登录密码
     */
    @TableField(value = "password")
    private String password;
    /**
     * 密码盐
     */
    @TableField(value = "salt")
    private String salt;
    /**
     * 用户类型 1-普通用户；2-管理员；3-租户管理员
     */
    @TableField(value = "user_type")
    private UserType userType;
    /**
     * 联系电话
     */
    @TableField(value = "phone")
    private String phone;
    /**
     * 1-正常；2-锁定；3-禁用；
     */
    @TableField(value = "status")
    private UserStatus status;
    /**
     * 是否已删除
     */
    @TableField(value = "deleted", fill = FieldFill.INSERT)
    @TableLogic
    private Boolean deleted;
    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;
}